package com.itheima.utils;

/**
 * 这里是封装ThreadLocal得工具类
 */
public class MyBaseContext {

    //创建ThreadLocal对象
    static ThreadLocal<Long> thread = new ThreadLocal<>();
    //创建一个静态方法供外部访问操作，进行存储管理员得id
    public static void setThreadLocal(Long id){
        thread.set(id);
    }


    public static Long getThreadLong(){
        return thread.get();
    }
}
